package web.controller.common;

import common.consts.ContentType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import service.RecruitmentGroupService;
import service.ServiceResponse;
import web.Routes;
import web.controller.Base;
import web.security.Protection;

/**
 * Created by aceyin on 15/7/6.
 * <p>
 * 自定义 招聘列表 分组。如 『钱多』，『离家近』等
 */
@RestController
@RequestMapping(Routes.Common.RECRUITMENT_GROUP)
public class RecruitmentGroup extends Base {

    @Autowired
    private RecruitmentGroupService recruitmentGroupService;

    @Protection
    @RequestMapping(method = RequestMethod.GET, produces = ContentType.JSON)
    public ServiceResponse list() {
        ServiceResponse response = recruitmentGroupService.getValidGroups();
        return response;
    }
}
